#include "GetAccessorNode.h"

#include "Output/Console.h"
#include "ScriptCompiler/Token/Token.h"
#include "ScriptCompiler/AST/TypeNode.h"
#include "ScriptCompiler/AST/AccessLevelNode.h"
#include "ScriptCompiler/AST/ParameterNode.h"
#include "ScriptCompiler/AST/SentenceBlockNode.h"
#include "ScriptCompiler/AST/ExpressionNode.h"

void CGetAccessorNode::DebugPrint(int32_t InDepth)
{
    //print depth
    for(int32_t i=0;i<InDepth;++i)
    {
        WH::Print(U"\t");
    }

    //print get
    WH::Print(U"get");

    if(Content.HasValue())
    {
        WH::Print(U"\n");
        //print { with depth
        for(int32_t i=0;i<InDepth;++i)
        {
            WH::Print(U"\t");
        }
        WH::Print(U"{\n");

        //print content
        Content.GetValue()->DebugPrint(InDepth);

        //print } with depth
        for(int32_t i=0;i<InDepth;++i)
        {
            WH::Print(U"\t");
        }
        WH::Print(U"}\n");
    }
    else if(LambdaContent.HasValue())
    {
        //print =>
        WH::Print(U"=> ");

        //print lambda content
        LambdaContent.GetValue()->DebugPrint(0);
    
        WH::Print(U";\n");
    }
    else
    {
        //print ;
        WH::Print(U";\n");
    }
}
